{extend name="v1/layout/base"}
{block name="content"}
<div class="layui-row layui-col-space15">
  <div class="layui-col-md12">
      <form class="layui-card-body layui-form layui-form-pane">
        <div class="layui-row layui-col-space10 layui-form-item">
          <div class="layui-col-lg8">
            <label class="layui-form-label">管理员昵称：</label>
            <div class="layui-input-block">
              <input type="text" name="admin_name" lay-verify="required" lay-reqtext="请输入管理员昵称" placeholder="请输入管理员昵称" autocomplete="off" class="layui-input">
            </div>
          </div>
        </div>
        <div class="layui-row layui-col-space10 layui-form-item">
          <div class="layui-col-lg8">
            <label class="layui-form-label">管理员头像：</label>
            <div class="layui-input-block">
              <div class="layui-upload">
                <div class="xk-big-show" datasrc="__COMMON__images/no_pic.png">
                  <input type="hidden" class="xk-picurl" name="head_pic" value="">
                  <img class="layui-upload-img  xk-img upload-pic" id="img-show-1" src="__COMMON__images/no_pic.png" width="100px" height="100px">
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="layui-row layui-col-space10 layui-form-item">
          <div class="layui-col-lg8">
            <label class="layui-form-label">所属管理组：</label>
            <div class="layui-input-block">
              <select name="admin_group_id" lay-verify="required" lay-reqtext="请选择所属管理组" lay-search>
                <option value="">请选择所属管理组</option>
                {volist name="$admin_group_list" id="vo"}
                <option value="{$vo.admin_group_id}">{$vo.group_name}</option>
                {/volist}
              </select>
            </div>
          </div>
        </div>
        <div class="layui-row layui-col-space10 layui-form-item">
          <div class="layui-col-lg8">
            <label class="layui-form-label">管理员登陆账号：</label>
            <div class="layui-input-block">
              <input type="text" name="admin_num" lay-verify="required" lay-reqtext="请输入管理员登陆账号"   placeholder="请输入管理员登陆账号" autocomplete="off" class="layui-input">
            </div>
          </div>
        </div>
        <div class="layui-row layui-col-space10 layui-form-item">
          <div class="layui-col-lg8">
            <label class="layui-form-label">管理员登陆密码：</label>
            <div class="layui-input-block">
              <input type="text" name="admin_pass" lay-verify="required" lay-reqtext="请输入管理员登陆密码"    placeholder="请输入管理员登陆密码" autocomplete="off" class="layui-input">
            </div>
          </div>
        </div>
        <div class="layui-row layui-col-space10 layui-form-item">
          <div class="layui-col-lg8">
            <label class="layui-form-label">管理员登陆确认密码：</label>
            <div class="layui-input-block">
              <input type="text" name="admin_pass1" lay-verify="required" lay-reqtext="请输入管理员登陆确认密码"    placeholder="请输入管理员登陆确认密码" autocomplete="off" class="layui-input">
            </div>
          </div>
        </div>
        <div class="layui-row layui-col-space10 layui-form-item">
          <div class="layui-col-lg8">
            <label class="layui-form-label">管理员邮箱：</label>
            <div class="layui-input-block">
              <input type="text" name="admin_email"  placeholder="请输入管理员邮箱" autocomplete="off" class="layui-input">
            </div>
          </div>
        </div>
        <div class="layui-row layui-col-space10 layui-form-item">
          <div class="layui-col-lg8">
            <label class="layui-form-label">管理员电话：</label>
            <div class="layui-input-block">
              <input type="text" name="admin_tel"  placeholder="请输入管理员电话" autocomplete="off" class="layui-input">
            </div>
          </div>
        </div>
        <div class="layui-row layui-col-space10 layui-form-item">
          <div class="layui-col-lg8">
            <label class="layui-form-label">是否启用：</label>
            <div class="layui-input-block">
              <input type="radio" name="status" value="1" title="启用" checked>
              <input type="radio" name="status" value="0" title="不启用" >
            </div>
          </div>
        </div>
        <!-- 底部操作按钮 -->
        <div class="layui-row">
          <div class="layui-col-xs3">&nbsp;</div>
          <div class="layui-col-xs4">
            <input type="hidden" name="act" value="create" />
            <button type="button" class="layui-btn layui-btn-primary layui-btn-radius" id="infoBackList"><i class="layui-icon">&#xe65c;</i>返回列表</button>
            <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit lay-filter="saveBtn"><i class="layui-icon">&#xe609;</i>立即更新</button>
          </div>
          <div class="layui-col-xs5">&nbsp;</div>
        </div>
        <!-- 底部操作按钮结束 -->
      </form>
  </div>
</div>
{/block}
{block name="myScript"}
<script>
  layui.use(['form'], function() {
    var form = layui.form,
      layer = layui.layer,
      $ = layui.$;
    //监听提交
    form.on('submit(saveBtn)', function(data) {
      var data = data.field,
          url = "{:url('/'.config('manage.manage_name').'/'.config('manage.version').'/Admin/adminSave')}";
      https(url, data, 'post', 1, '正在保存信息').then(res => {
        xkMsg(res.result_msg);
      }, fail => {})
      return false;
    });
  });
</script>
{/block}
